<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page import="java.util.Date"%>
<!DOCTYPE html>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
	Date nowDate = new Date();
	request.setAttribute("nowDate", nowDate);
%>

<html>
<base href="<%=basePath%>">
<head>

<meta charset="UTF-8">
<meta name="Keywords" content="关键词,关键词">
<meta name="description" content="">
<title></title>
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/select-widget-min.js"></script>
<link rel="stylesheet" href="css/drop-down.css" />
<link rel="stylesheet" href="css/base.css" type="text/css" />
<link rel="stylesheet" href="css/headbott.css" type="text/css" />
<link rel="stylesheet" href="css/product-list.css" type="text/css" />

</head>
<body>
	<div id="header">
		<div class="heade-con">
			<div class="logo">
				<a href=""><img src="images/LOGO.png" /></a>
			</div>
			<div class="nav posa">
				<ul>
					<li><a href="index.do">首页</a></li>
					<li><a class="vcolor" href="project/queryByType.do">公益众筹</a></li>
					<li><a href="problem/queryAll.do">常见问题</a></li>
					<li><a href="ly-list.do">众筹资讯</a></li>
					<li><a href="new_info.do" style="">发布项目</a></li>
				</ul>
			</div>
			<div class="search">
				<form action="">
					<input type="text" class="search-txt" value="" placeholder="找项目">
					<input type="submit" class="search-but" value="">
				</form>
			</div>
			<div class="index-login">
				<c:choose>
					<c:when test="${login_user!=null }">
						<a href="project/queryByUsId.do">${login_user.usAccount }</a>
						<a href="user/quit.do">退出</a>
					</c:when>
					<c:otherwise>
						<a href="login.do">登录</a>
						<span style="color: white;">|</span>
						<a href="reg.do">注册</a>
					</c:otherwise>
				</c:choose>
			</div>
		</div>
	</div>

	<div class="product-con">
		<h1 class="product-con_tit">公益众筹</h1>
		<div class="product-con_nav">
			<a id="pst_id0" href="project/queryByType.do?pst_id=0"><i><img
					src="images/ii_04.png" alt="" /></i>全部</a>
			<c:forEach items="${all_type}" var="type">
				<a id="pst_id${type.pstId}"
					href="project/queryByType.do?pst_id=${type.pstId}"><i><img
						src="images/ii_06.png" alt="" /></i>${type.pstName}</a>
			</c:forEach>
			<div class="select-li">
				<span>状态:</span> <select name="drop2" id="select_type"
					onchange="select_XX()" class="ui-select">
					<option id="type0" value="0">全部</option>
					<option id="type1" value="1">待上架</option>
					<option id="type2" value="2">众筹中</option>
					<option id="type3" value="3">众筹成功</option>
					<option id="type4" value="4">众筹失败</option>
				</select>
			</div>
			<div class="select-li2">
				<span>排序:</span> <select name="drop2" id="select_ordeby"
					onchange="select_XX()" class="ui-select">
					<option id="ordeby0" value="0">默认</option>
					<option id="ordeby1" value="1">按人气上升</option>
					<option id="ordeby2" value="2">按人气下降</option>
					<option id="ordeby3" value="3">按完成度上升</option>
					<option id="ordeby4" value="4">按完成度下降</option>
				</select>
			</div>

		</div>

		<div class="product-list-l">
			<ul>
				<c:forEach items="${p.list }" var="lispt_project">
					<c:choose>
						<c:when test="${nowDate<lispt_project.psStarttime }">
							<li class="yrz">
								<div class="product-list-lpic">
									<a href="project/queryById.do?ps_id=${lispt_project.psId }">
										<c:choose>
											<c:when
												test="${lispt_project.psName==null||lispt_project.psName=='' }">
												<img src="images/prr-dduu_27.jpg" alt="" width="230px" height="180px" />
											</c:when>
											<c:otherwise>
												<img src="${lispt_project.psName }" alt=""  width="230px" height="180px" />
											</c:otherwise>
										</c:choose>
									</a>
									<div class="product_one">预热中</div>
								</div>
								<p>
									<a href="project/queryById.do?ps_id=${lispt_project.psId }">${lispt_project.psFile }</a>
								</p>
								<div class="product-list-lmin">
									<dl>
										<dt>${lispt_project.psGetmoney*100/lispt_project.psMoney }%</dt>
										<dd>达成率</dd>
									</dl>
									<dl>
										<dt>${lispt_project.psGetmoney }</dt>
										<dd>已筹金额</dd>
									</dl>
									<dl>
										<dt>${lispt_project.psGetpeople }</dt>
										<dd>支持人数</dd>
									</dl>
								</div>
							</li>
						</c:when>
						<c:when test="${nowDate>lispt_project.psEndtime }">
							<c:if
								test="${(lispt_project.psGetmoney*100/lispt_project.psMoney)>=100 }">
								<li class="cz">
									<div class="product-list-lpic">
										<a href="project/queryById.do?ps_id=${lispt_project.psId }">
											<c:choose>
												<c:when
													test="${lispt_project.psName==null||lispt_project.psName=='' }">
													<img src="images/prr-dduu_27.jpg" alt="" width="230px" height="180px"/>
												</c:when>
												<c:otherwise>
													<img src="${lispt_project.psName }" alt=""  width="230px" height="180px" />
												</c:otherwise>
											</c:choose>
										</a>
										<div class="product_one">项目成功</div>
									</div>
									<p>
										<a href="project/queryById.do?ps_id=${lispt_project.psId }">${lispt_project.psFile }</a>
									</p>
									<div class="product-list-lmin">
										<dl>
											<dt>${lispt_project.psGetmoney*100/lispt_project.psMoney }%</dt>
											<dd>达成率</dd>
										</dl>
										<dl>
											<dt>${lispt_project.psGetmoney }</dt>
											<dd>已筹金额</dd>
										</dl>
										<dl>
											<dt>${lispt_project.psGetpeople }</dt>
											<dd>支持人数</dd>
										</dl>
									</div>
								</li>

							</c:if>
							<c:if
								test="${(lispt_project.psGetmoney*100/lispt_project.psMoney)<100 }">
								<li class="cz">
									<div class="product-list-lpic">
										<a href="project/queryById.do?ps_id=${lispt_project.psId }">
											<c:choose>
												<c:when
													test="${lispt_project.psName==null||lispt_project.psName=='' }">
													<img src="images/prr-dduu_27.jpg" alt="" width="230px" height="180px"/>
												</c:when>
												<c:otherwise>
													<img src="${lispt_project.psName }" alt=""  width="230px" height="180px"/>
												</c:otherwise>
											</c:choose>
										</a>
										<div class="product_one">项目失败</div>
									</div>
									<p>
										<a href="project/queryById.do?ps_id=${lispt_project.psId }">${lispt_project.psFile }</a>
									</p>
									<div class="product-list-lmin">
										<dl>
											<dt>${lispt_project.psGetmoney*100/lispt_project.psMoney }%</dt>
											<dd>达成率</dd>
										</dl>
										<dl>
											<dt>${lispt_project.psGetmoney }</dt>
											<dd>已筹金额</dd>
										</dl>
										<dl>
											<dt>${lispt_project.psGetpeople }</dt>
											<dd>支持人数</dd>
										</dl>
									</div>
								</li>

							</c:if>
						</c:when>
						<c:when
							test="${nowDate>lispt_project.psStarttime&&nowDate<lispt_project.psEndtime }">
							<li class="zcz">
								<div class="product-list-lpic">
									<a href="project/queryById.do?ps_id=${lispt_project.psId }"><c:choose>
											<c:when
												test="${lispt_project.psName==null||lispt_project.psName=='' }">
												<img src="images/prr-dduu_27.jpg" alt=""  width="230px" height="180px"/>
											</c:when>
											<c:otherwise>
												<img src="${lispt_project.psName }" width="230px" height="180px"  />
											</c:otherwise>
										</c:choose></a>
									<div class="product_one">筹款中</div>
								</div>
								<p>
									<a href="project/queryById.do?ps_id=${lispt_project.psId }">${lispt_project.psFile }</a>
								</p>
								<div class="product-list-lmin">
									<dl>
										<dt>${lispt_project.psGetmoney*100/lispt_project.psMoney }%</dt>
										<dd>达成率</dd>
									</dl>
									<dl>
										<dt>${lispt_project.psGetmoney }</dt>
										<dd>已筹金额</dd>
									</dl>
									<dl>
										<dt>${lispt_project.psGetpeople }</dt>
										<dd>支持人数</dd>
									</dl>
								</div>
							</li>
						</c:when>
					</c:choose>
				</c:forEach>
			</ul>
		</div>
		<div class="product-ym">
			<a class="product-ym_xyy"
				href="project/queryByType.do?tr=${p.prePage }">&lt;上一页</a> <a
				href="javascritp:void(0)">第${p.pageNum }</a><a
				href="javascritp:void(0)">/</a><a href="javascritp:void(0)">共${p.pages }</a>
			<c:if test="${p.pageNum<p.pages }"><a class="product-ym_xyy"
				href="project/queryByType.do?tr=${p.nextPage }">下一页&gt;</a></c:if>

		</div>
	</div>
	<div id="bottom">
		<div class="bot-con1">
			<ul>
				<li class="bot-con1-li1">我们已经做到</li>
				<li>单项支持人数<span class="inde-span1"></span></li>
				<li>单项筹款金额<span class="inde-span2"></span></li>
				<li>累计筹款金额<span class="inde-span3"></span></li>
			</ul>
		</div>
		<div class="bot-con1 bot-con2">
			<ul>
				<li class="bot-con1-li1">发起项目流程</li>
				<li><span class="inde-span4"></span>发起人创建项目</li>
				<li><span class="inde-span5"></span>项目获得支持</li>
				<li><span class="inde-span6"></span>发起人发放回报</li>
				<li><span class="inde-span7"></span>用户收到回报</li>
			</ul>
		</div>
		<div class="bottom-ggt">
			<a href=""><img src="images/bottbom_68.jpg" alt="" /></a>
		</div>
		<div class="zc-yqlink">
			<ul>
				<li><a href="">阿里巴巴集团</a></li>
				<li><a href="">淘宝网</a></li>
				<li><a href="">天猫</a></li>
				<li><a href="">聚划算</a></li>
				<li><a href="">全球速卖通</a></li>
				<li><a href="">阿里巴巴国际交易市场</a></li>
				<li><a href="">1688</a></li>
				<li><a href="">阿里妈妈</a></li>
				<li><a href="">阿里旅行</a></li>
				<li><a href="">阿里云计算</a></li>
				<li><a href="">阿里巴巴集团</a></li>
				<li><a href="">淘宝网</a></li>
				<li><a href="">天猫</a></li>
				<li><a href="">聚划算</a></li>
				<li><a href="">全球速卖通</a></li>
				<li><a href="">阿里巴巴国际交易市场</a></li>
				<li><a href="">1688</a></li>
				<li><a href="">阿里妈妈</a></li>
				<li><a href="">阿里云计算</a></li>
			</ul>
		</div>
		<div class="footer-bd">

			<a href=" ">关于淘宝</a> <a href=" ">合作伙伴</a> <a href=" ">营销中心</a> <a
				href=" ">廉正举报</a> <a href=" ">联系客服</a> <a href=" ">开放平台</a> <a
				href=" ">诚征英才</a> <a href=" ">联系我们</a> <a href=" ">网站地图</a> <a
				href=" ">法律声明</a> <em>© 2003-2015 Taobao.com 版权所有</em><br> <br>
			<span>网络文化经营许可证：<a href=" ">浙网文[2013]0268-027号</a></span> <b>|</b> <span
				data-spm-protocol="i">增值电信业务经营许可证：<a href="">浙B2-20080224-1</a></span>
			<b>|</b> <span>信息网络传播视听节目许可证：1109364号</span> <b>|</b> <span>举报电话:0571-81683755</span>
		</div>
	</div>
	<script type="text/javascript">
		
	function select_XX(){
			var type = $("#select_type").val();
			var order = $("#select_ordeby").val();
			
			window.location.href = "project/queryByType.do?type="+type+"&&order="+order;
			
		}
		
	
	$(function(){
		//获取域中数据
		var opt_value = '<%=request.getAttribute("opt_order")%>';
		//判断 默认选中指定的option
		$("#ordeby"+opt_value).attr("selected","selected");
		var opt_type = '<%=request.getAttribute("opt_type")%>';
		$("#type"+opt_type).attr("selected","selected");
		var pst_id = '<%=request.getAttribute("pst_id")%>';
			$("#pst_id" + pst_id).attr("class", "lnav_bg");
 		})
	</script>

</body>
</html>